package day04;


import java.util.Stack;

public class Dec2Binary {

    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        int n = 6;
        do {
            stack.push(n & 1);
            n >>= 1;
        } while (n > 0);
        while (!stack.isEmpty()) {
            System.out.print(stack.peek());
            stack.pop();
        }
    }
}